package com.meilai.project.controller.web.business.contract.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.meilai.project.controller.web.business.contract.ContractProxyMediaReplacePriceReq;
import com.meilai.project.dto.business.contract.MediaDetailReq;
import com.meilai.project.dto.business.contract.PayDetailReq;
import com.meilai.project.dto.business.contract.ProxyMediaDetailReq;
import com.meilai.project.dto.workflow.WorkFlowExtraSubmitDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * @author chenxing
 */
@Data
@ApiModel
public class ContractApplySaveReq extends WorkFlowExtraSubmitDTO {

    @ApiModelProperty("合同编号")
    private String contract_num;

    @ApiModelProperty("客户ID（项目名称）")
    private Long customer_id;

    @ApiModelProperty("甲方")
    private String part_a;

    @ApiModelProperty("乙方id")
    private Long part_b_id;

    @ApiModelProperty("乙方名称")
    private String part_b_name;

    @ApiModelProperty("甲方人联系方式")
    private String part_a_contact;

    @ApiModelProperty("乙方人联系方式")
    private String part_b_contact;

    @ApiModelProperty("开户名")
    private String bank_account_name;

    @ApiModelProperty("开户行名")
    private String bank_name;

    @ApiModelProperty("开户号")
    private String bank_num;

    @ApiModelProperty("合同开始日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate contract_begin_date;

    @ApiModelProperty("合同结束日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate contract_end_date;

    @ApiModelProperty("签订日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate sign_date;


    @ApiModelProperty("优惠价格")
    private BigDecimal discounted_price;

    @ApiModelProperty("优惠价格（大写）")
    private String discounted_price_big;

    //todo new
    @ApiModelProperty("是否含税")
    private Boolean contain_tax;

    //todo new
    @ApiModelProperty("另收**%税费")
    private BigDecimal tax_percent;

    //todo new
    @ApiModelProperty("税费金额")
    private BigDecimal tax;

    @ApiModelProperty("自有资源价格")
    private BigDecimal self_price;

    //todo new
    @ApiModelProperty("自有资源价格（大写）")
    private String self_price_big;

    @ApiModelProperty("代理资源价格")
    private BigDecimal proxy_price;

    //todo new
    @ApiModelProperty("代理资源价格（大写）")
    private String proxy_price_big;

    @ApiModelProperty("画面更换价格")
    private BigDecimal replace_price;

    @ApiModelProperty("画面多次更换价格")
    private BigDecimal multi_replace_price;

    @ApiModelProperty("验收方式")
    private String acceptance_way;

    //todo new
    @ApiModelProperty("现金支付金额")
    private BigDecimal pay_cash_amount;

    //todo new
    @ApiModelProperty("现金支付金额（大写）")
    private String pay_cash_amount_big;

    //todo new
    @ApiModelProperty("置换金额")
    private BigDecimal displace_amount;

    //todo new
    @ApiModelProperty("置换金额（大写）")
    private String displace_amount_big;

    @ApiModelProperty("备注")
    private String memo;

    @ApiModelProperty("备注")
    private String other_memo;

    @ApiModelProperty("父合同ID，补充协议时使用，普通合同不传")
    private Long parent_id;

    @ApiModelProperty("自营媒体资源明细")
    private List<MediaDetailReq> mediaDetailList;

    @ApiModelProperty("附件id列表")
    private List<ContractAttachmentReq> attachmentList;

    @ApiModelProperty("代理情况明细")
    private List<ProxyMediaDetailReq> proxyMediaDetailList;

    @ApiModelProperty("付款明细")
    private List<PayDetailReq> payDetailList;

    @ApiModelProperty("自有资源媒体类型换画价格")
    private List<ContractMediaReplacePriceReq> contractMediaReplacePriceList;

    @ApiModelProperty("代理资源媒体类型换画价格")
    private List<ContractProxyMediaReplacePriceReq> contractProxyMediaReplacePriceList;
}
